<html>
  <head>
    <title>AJAX and Dojo toolkit</title>
    <script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js">
    </script>
    <script type="text/javascript">
      function printUsers(){
    var xhrArgs = {
      url: "files/subscribers.xml",
      //preventCache: true,
	  handleAs: "xml",
	  timeout: 10000, //give up after 10 seconds
	  load: function(response){
		resultDoc = response.documentElement;
		//debugXmlDoc(resultDoc);
    	alert(response.getElementsByTagName("name")[0].childNodes[0].nodeValue);
	  },
	  error: function(err){
	    alert("Error loading > "+err);
	  }
    };
    //Initiate the async call.
    dojo.xhrGet(xhrArgs);
      }
    </script>
  </head>
  <body>
    <button onclick="printUsers()">List Users</button>
    <br /><br />
    <div id="results">
    </div>
  </body>
</html>